<?php
$item = $_POST['item'];
$user = $_POST['user'];
$money = $_POST['money'];
safe_query("INSERT INTO bets (user, money, date, itemID) VALUES (
'".$user."', 
'".$money."',
'".time()."',
'".$item."')");

safe_query("UPDATE item SET price = price + '".$money."' WHERE id='".$item."'");
?>